import React from 'react';

const Panel = (props) => {
  return <>
    <h1>这是一个面板</h1>
    {/* 子组件通过 props.children 接收 */}
    {props.children}
  </>;
};


class App extends React.Component {
  render() {
    return (
      <div className="App">
        <Panel>
          {/* 老爸传过来的数据 */}
          <button>确定</button>
          <button>取消</button>
        </Panel>
      </div>
    );
  }
}

export default App;
